package com.cyb.binojbackendserviceclient.service;

import com.cyb.binojbackendcommon.common.BaseResponse;
import com.cyb.binojbackendcommon.common.ResultUtils;
import com.cyb.binojbackendmodel.model.codesandbox.JudgeInfo;
import com.cyb.binojbackendmodel.model.entity.Question;
import com.cyb.binojbackendmodel.model.entity.QuestionSubmit;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * @author 22735
 * @description 针对表【question(题目)】的数据库操作Service
 * @createDate 2025-10-09 14:52:21
 */
@FeignClient(name = "binoj-backend-question-service", path = "/api/question/inner")
public interface QuestionFeginClient {

    @GetMapping("/get/id")
    Question getQuestionById(@RequestParam("questionId") long questionId);

    @GetMapping("/question_submit/get/id")
    QuestionSubmit getQuestionSubmitById(@RequestParam("questionSubmitId")long questionSubmitId);


    @PostMapping("/question_submit/update")
    boolean updateQuestionSubmitById(@RequestBody QuestionSubmit questionSubmit);

    @PostMapping("/question_submit/modify")
    boolean modifyCommit(@RequestParam("questionId") long questionId, @RequestBody JudgeInfo judgeInfo);

}
